import { Card } from 'antd'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { 
  faBook, 
  faChartBar, 
  faCog,
  faUsers,
  faComments,
  faFlag
} from '@fortawesome/free-solid-svg-icons'
import './index.scss'

const QuickEntry = ({ title }) => {
  const entries = [
    { icon: faBook, label: '图书管理', color: '#1890ff' },
    { icon: faChartBar, label: '数据统计', color: '#52c41a' },
    { icon: faCog, label: '系统设置', color: '#faad14' },
    { icon: faUsers, label: '用户管理', color: '#722ed1' },
    { icon: faComments, label: '评论审核', color: '#eb2f96' },
    { icon: faFlag, label: '投诉处理', color: '#13c2c2' }
  ]

  return (
    <Card title={title} className="quick-entry-card" extra={<a href="#more">查看更多</a>}>
      <div className="entry-grid">
        {entries.map((entry, index) => (
          <div key={index} className="entry-item">
            <div className="entry-icon" style={{ background: entry.color }}>
              <FontAwesomeIcon icon={entry.icon} />
            </div>
            <span className="entry-label">{entry.label}</span>
          </div>
        ))}
      </div>
    </Card>
  )
}

export default QuickEntry
